'use strict';

define([
    'services'
], function (services) {
    services.system.register('AdminService', ['$resource', function ($resource) {
        return $resource('/rest/system/admin/:id', {id: '@id'}, {
            query: {
                isArray: false
            },
            disable: {
                url: '/rest/system/admin/:id/disable',
                method: 'POST',
                params: {id: '@id'},
                isArray: false
            },
            enable: {
                url: '/rest/system/admin/:id/enable',
                method: 'POST',
                params: {id: '@id'},
                isArray: false
            },
            disableAll: {
                url: '/rest/system/admin/disableAll',
                method: 'POST',
                isArray: false
            },
            removeAll: {
                url: '/rest/system/admin/deleteAll',
                method: 'POST',
                isArray: false
            },
            getLdapUser: {
                url: '/rest/system/admin/getLdapUser',
                method: 'GET',
                isArray: false
            },
            getByAccount: {
                url: '/rest/system/admin/getByAccount',
                method: 'GET',
                isArray: false
            },
            getPrivilege: {
                url: '/rest/system/admin/:id/privilege',
                method: 'GET',
                params: {id: '@id'},
                isArray: false
            },
            savePrivilege: {
                url: '/rest/system/admin/:id/privilege',
                method: 'POST',
                params: {id: '@id'},
                isArray: false
            }
        });
    }]);
});